﻿
ToleranceValue = {
	type = character

	text = {
		localization_key = tolerance_righteous

		trigger = {
			faith = {
				faith_hostility_level = {
					target = scope:second.faith
					value = faith_fully_accepted_level
				}
			}
		}
	}
	text = {
		localization_key = tolerance_astray

		trigger = {
			faith = {
				faith_hostility_level = {
					target = scope:second.faith
					value = faith_astray_level
				}
			}
		}
	}
	text = {
		localization_key = tolerance_sinister

		trigger = {
			faith = {
				faith_hostility_level = {
					target = scope:second.faith
					value = faith_hostile_level
				}
			}
		}
	}
	text = {
		localization_key = tolerance_evil

		trigger = {
			faith = {
				faith_hostility_level = {
					target = scope:second.faith
					value = faith_evil_level
				}
			}
		}
	}
}

ToleranceValueConcept = {
	type = character

	text = {
		localization_key = FAITH_HOSTILITY_RIGHTEOUS

		trigger = {
			faith = {
				faith_hostility_level = {
					target = scope:second.faith
					value = faith_fully_accepted_level
				}
			}
		}
	}
	text = {
		localization_key = FAITH_HOSTILITY_ASTRAY

		trigger = {
			faith = {
				faith_hostility_level = {
					target = scope:second.faith
					value = faith_astray_level
				}
			}
		}
	}
	text = {
		localization_key = FAITH_HOSTILITY_HOSTILE

		trigger = {
			faith = {
				faith_hostility_level = {
					target = scope:second.faith
					value = faith_hostile_level
				}
			}
		}
	}
	text = {
		localization_key = FAITH_HOSTILITY_EVIL

		trigger = {
			faith = {
				faith_hostility_level = {
					target = scope:second.faith
					value = faith_evil_level
				}
			}
		}
	}
}

MyPriestTitle = {
	type = character

	text = {
		trigger = {
			exists = cp:councillor_court_chaplain
			cp:councillor_court_chaplain = {
				is_female = no
			}
		}
		localization_key = male_priest_title
	}
	text = {
		trigger = {
			exists = cp:councillor_court_chaplain
			cp:councillor_court_chaplain = {
				is_female = yes
			}
		}
		localization_key = female_priest_title
	}
	text = {
		trigger = {
			always = no
		}
		localization_key = neuter_priest_title
		fallback = yes
	}
}

PriestTitle = {
	type = character

	text = {
		trigger = { is_female = no }
		localization_key = male_priest_title
	}
	text = {
		trigger = { is_female = yes }
		localization_key = female_priest_title
	}
	text = {
		trigger = { always = no }
		localization_key = neuter_priest_title
		fallback = yes
	}
}

# For use when refering to a priest of unspecified gender, or the concept of priests in general.
DefaultPriestTitle = {
	type = character

	text = {
		trigger = {
			faith = {
				OR = {
					has_doctrine = doctrine_clerical_gender_male_only
					AND = {
						has_doctrine = doctrine_clerical_gender_either
						has_doctrine = doctrine_gender_male_dominated
					}
				}
			}
		}
		localization_key = male_priest_title
	}

	text = {
		trigger = {
			faith = {
				OR = {
					has_doctrine = doctrine_clerical_gender_female_only
					AND = {
						has_doctrine = doctrine_clerical_gender_either
						has_doctrine = doctrine_gender_female_dominated
					}
				}
			}
		}
		localization_key = female_priest_title
	}

	text = {
		trigger = {
			faith = {
				has_doctrine = doctrine_clerical_gender_either
				has_doctrine = doctrine_gender_equal
			}
		}
		localization_key = neuter_priest_title
		fallback = yes
	}
}

DefaultPriestTitlePlural = {
	type = character

	text = {
		trigger = {
			faith = {
				OR = {
					has_doctrine = doctrine_clerical_gender_male_only
					AND = {
						has_doctrine = doctrine_clerical_gender_either
						has_doctrine = doctrine_gender_male_dominated
					}
				}
			}
		}
		localization_key = male_priest_title_plural
	}

	text = {
		trigger = {
			faith = {
				OR = {
					has_doctrine = doctrine_clerical_gender_female_only
					AND = {
						has_doctrine = doctrine_clerical_gender_either
						has_doctrine = doctrine_gender_female_dominated
					}
				}
			}
		}
		localization_key = female_priest_title_plural
	}

	text = {
		trigger = {
			faith = {
				has_doctrine = doctrine_clerical_gender_either
				has_doctrine = doctrine_gender_equal
			}
		}
		localization_key = neuter_priest_title_plural
		fallback = yes
	}
}

# For use when refering to a priest of unspecified gender, or the concept of priests in general.
DefaultPriestWomenMen = {
	type = character

	text = {
		trigger = {
			faith = {
				OR = {
					has_doctrine = doctrine_clerical_gender_male_only
					AND = {
						has_doctrine = doctrine_clerical_gender_either
						has_doctrine = doctrine_gender_male_dominated
					}
				}
			}
		}
		localization_key = CHARACTER_MEN
	}

	text = {
		trigger = {
			faith = {
				OR = {
					has_doctrine = doctrine_clerical_gender_female_only
					AND = {
						has_doctrine = doctrine_clerical_gender_either
						has_doctrine = doctrine_gender_female_dominated
					}
				}
			}
		}
		localization_key = CHARACTER_WOMEN
	}

	text = {
		trigger = {
			faith = {
				has_doctrine = doctrine_clerical_gender_either
				has_doctrine = doctrine_gender_equal
			}
		}
		localization_key = CHARACTER_MEN
		fallback = yes
	}
}

DefaultBishopTitle = {
	type = character

	text = {
		trigger = {
			faith = {
				OR = {
					has_doctrine = doctrine_clerical_gender_male_only
					AND = {
						has_doctrine = doctrine_clerical_gender_either
						has_doctrine = doctrine_gender_male_dominated
					}
				}
			}
		}
		localization_key = male_bishop_title
	}

	text = {
		trigger = {
			faith = {
				OR = {
					has_doctrine = doctrine_clerical_gender_female_only
					AND = {
						has_doctrine = doctrine_clerical_gender_either
						has_doctrine = doctrine_gender_female_dominated
					}
				}
			}
		}
		localization_key = female_bishop_title
	}

	text = {
		trigger = {
			faith = {
				has_doctrine = doctrine_clerical_gender_either
				has_doctrine = doctrine_gender_equal
			}
		}
		localization_key = neuter_bishop_title
		fallback = yes
	}
}

DefaultBishopTitlePlural = {
	type = character

	text = {
		trigger = {
			faith = {
				OR = {
					has_doctrine = doctrine_clerical_gender_male_only
					AND = {
						has_doctrine = doctrine_clerical_gender_either
						has_doctrine = doctrine_gender_male_dominated
					}
				}
			}
		}
		localization_key = male_bishop_title_plural
	}

	text = {
		trigger = {
			faith = {
				OR = {
					has_doctrine = doctrine_clerical_gender_female_only
					AND = {
						has_doctrine = doctrine_clerical_gender_either
						has_doctrine = doctrine_gender_female_dominated
					}
				}
			}
		}
		localization_key = female_bishop_title_plural
	}

	text = {
		trigger = {
			faith = {
				has_doctrine = doctrine_clerical_gender_either
				has_doctrine = doctrine_gender_equal
			}
		}
		localization_key = neuter_bishop_title_plural
		fallback = yes
	}
}

#Returns Heathen for Pagans and Infidels for other Faiths.
GetUnbelieverName = {
	type = character

	text = {
		trigger = {
			faith = {
				has_doctrine = pagan_hostility_doctrine
			}
		}
		localization_key = unbeliever_heathen
	}
	text = {
		trigger = {
			faith = {
				NOT = { has_doctrine = pagan_hostility_doctrine }
			}
		}
		localization_key = unbeliever_infidel
	}
}


#Returns Heathens for Pagans and Infidels for other Faiths.
GetUnbelieverNamePlural = {
	type = character

	text = {
		trigger = {
			faith = {
				has_doctrine = pagan_hostility_doctrine
			}
		}
		localization_key = unbeliever_heathen_plural
	}
	text = {
		trigger = {
			faith = {
				NOT = { has_doctrine = pagan_hostility_doctrine }
			}
		}
		localization_key = unbeliever_infidel_plural
	}
}

GetUnbelieverTerm = {
	type = character

	text = {
		trigger = {
			is_infidel_trigger = { WHO = scope:second TARGET = root}
		}
		localization_key = unbeliever_infidel
	}
	text = {
		trigger = {
			is_heathen_trigger = { WHO = scope:second TARGET = root}
		}
		localization_key = unbeliever_heathen
	}
	text = {
		trigger = {
			is_heretic_trigger = { WHO = scope:second TARGET = root}
		}
		localization_key = unbeliever_heretic
	}
	text = {
		trigger = { always = yes }
		localization_key = unbeliever_unbeliever
	}
}

GetUnbelieverTermPlural = {
	type = character
	parent = GetUnbelieverTerm
	suffix = _plural
}

GetUnbelieverTermAdjective = {
	type = character

	text = {
		trigger = {
			is_infidel_trigger = { WHO = scope:second TARGET = root}
		}
		localization_key = unbeliever_infidel_adj
	}
	text = {
		trigger = {
			is_heathen_trigger = { WHO = scope:second TARGET = root}
		}
		localization_key = unbeliever_heathen_adj
	}
	text = {
		trigger = {
			is_heretic_trigger = { WHO = scope:second TARGET = root}
		}
		localization_key = unbeliever_heretic_adj
	}
	text = {
		trigger = { always = yes }
		localization_key = unbeliever_unbeliever_adj
	}
}

GetUnbelieverAndForeignerTerm = {
	type = character

	text = {
		trigger = {
			is_infidel_trigger = { WHO = scope:second TARGET = root}
			NOT = { scope:second.culture = root.culture }
		}
		localization_key = unbeliever_foreign_infidel
	}
	text = {
		trigger = {
			is_heathen_trigger = { WHO = scope:second TARGET = root}
			NOT = { scope:second.culture = root.culture }
		}
		localization_key = unbeliever_foreign_heathen
	}
	text = {
		trigger = {
			is_heretic_trigger = { WHO = scope:second TARGET = root}
			NOT = { scope:second.culture = root.culture }
		}
		localization_key = unbeliever_foreign_heretic
	}
	text = {
		trigger = {
			is_infidel_trigger = { WHO = scope:second TARGET = root}
		}
		localization_key = unbeliever_infidel
	}
	text = {
		trigger = {
			is_heathen_trigger = { WHO = scope:second TARGET = root}
		}
		localization_key = unbeliever_heathen
	}
	text = {
		trigger = {
			is_heretic_trigger = { WHO = scope:second TARGET = root}
		}
		localization_key = unbeliever_heretic
	}
	text = {
		fallback = yes
		localization_key = unbeliever_believer
	}
}

#Intended to be used only for faith_creation.1001, and references scopes defined in that event.
GetFaithCreationReaction = {
	type = character

	text = {
		trigger = {
			root = scope:second
		}
		localization_key = faith_creation.1001.o.personal
	}
	text = {
		trigger = {
			scope:second = {
				faith = {
					save_temporary_scope_as = reformed_faith
				}
			}
			faith = {
				religion = scope:reformed_faith.religion
				faith_hostility_level = {
					target = scope:reformed_faith
					value > 1
				}
			}

		}
		localization_key = faith_creation.1001.o.heretical
	}
	text = {
		trigger = {
			scope:second = {
				faith = {
					save_temporary_scope_as = reformed_faith
				}
			}
			scope:reformed_faith = {
				OR = {
					has_doctrine_parameter = great_holy_wars_active
					has_doctrine_parameter = great_holy_wars_active_if_reformed
				}
				OR = {
					has_doctrine_parameter = cannibalism_legal
					has_doctrine_parameter = human_sacrifice_active
				}
			}
			NOR = {
				faith = {
					has_doctrine_parameter = cannibalism_legal
					has_doctrine_parameter = human_sacrifice_active
				}
			}
		}
		localization_key = faith_creation.1001.o.frightened
	}
	text = {
		trigger = {
			scope:second = {
				faith = {
					save_temporary_scope_as = reformed_faith
				}
			}
			faith = {
				OR = {
					has_doctrine_parameter = great_holy_wars_active
					AND = {
						has_doctrine_parameter = great_holy_wars_active_if_reformed
						NOT = { has_doctrine_parameter = unreformed }
					}
				}
				faith_hostility_level = {
					target = scope:reformed_faith
					value > 1
				}
			}
		}
		localization_key = faith_creation.1001.o.crusader
	}
	text = {
		trigger = {
			scope:second = {
				faith = {
					save_temporary_scope_as = reformed_faith
				}
			}
			faith = {
				faith_hostility_level = {
					target = scope:reformed_faith
					value <= 1
				}
			}
		}
		localization_key = faith_creation.1001.o.interested
	}
	text = {
		localization_key = faith_creation.1001.o.uninterested
	}
}

GetAfterLifeDestination = {
	type = character

	text = {
		trigger = {
			faith = {
				has_doctrine_parameter = reincarnation_resistance_to_conversion
			}
		}
		localization_key = character_afterlife_reincarnation
	}

	text = {
		trigger = {
			num_sinful_traits > num_virtuous_traits
		}
		localization_key = character_afterlife_negative
	}

	text = {
		localization_key = character_afterlife_positive
	}
}

# GetActualBishopTitlePossessive should be updated synchronously with this
GetActualBishopTitle = {
	type = character

	# 'Early Out' keys for Head of Faith/Landed Rulers.
	text = {
		trigger = {
			exists = faith.religious_head
			this = faith.religious_head
		}
		localization_key = religious_head_name
	}
	text = {
		trigger = {
			is_playable_character = yes
		}
		localization_key = ruler_title_name
	}

	# Religion-By-Religion Titles for Bishops based on Liege's Tier.

	# Ryukyuan
	text = {
		trigger = {
			liege.highest_held_title_tier >= tier_kingdom
			faith = faith:ryukyuan
			is_female = yes
		}
		localization_key = councillor_court_chaplain_ryukyuan_female_kingdom
	}
	text = {
		trigger = {
			liege.highest_held_title_tier < tier_kingdom
			faith = faith:ryukyuan
			is_female = yes
		}
		localization_key = councillor_court_chaplain_ryukyuan_female_duchy
	}
	text = {
		trigger = {
			faith = faith:ryukyuan
			is_female = no
		}
		localization_key = councillor_court_chaplain_ryukyuan_male
	}

	# Shinto (except Ryukyuan)
	text = {
		trigger = {
			faith.religion = faith:shinto.religion
		}
		localization_key = councillor_court_chaplain_shinto
	}

	# Zunism
	text = {
		trigger = {
			liege.highest_held_title_tier >= tier_kingdom
			faith.religion = faith:zun_pagan.religion
			is_female = no
		}
		localization_key = councillor_court_chaplain_zunism_religion_kingdom
	}
	text = {
		trigger = {
			liege.highest_held_title_tier < tier_kingdom
			faith.religion = faith:zun_pagan.religion
			is_female = no
		}
		localization_key = councillor_court_chaplain_zunism_religion_duchy
	}

	# Zoroastrianism
	text = {
		trigger = {
			liege.highest_held_title_tier >= tier_kingdom
			is_female = no
			fp3_custom_divinity_for_zoroastrianism_faiths = yes
		}
		localization_key = councillor_court_chaplain_zoroastrianism_religion_kingdom
	}
	text = {
		trigger = {
			liege.highest_held_title_tier >= tier_kingdom
			is_female = yes
			fp3_custom_divinity_for_zoroastrianism_faiths = yes
		}
		localization_key = councillor_court_chaplain_zoroastrianism_religion_kingdom_female
	}
	text = {
		trigger = {
			liege.highest_held_title_tier >= tier_duchy
			is_female = no
			fp3_custom_divinity_for_zoroastrianism_faiths = yes
		}
		localization_key = councillor_court_chaplain_zoroastrianism_religion_duchy
	}
	text = {
		trigger = {
			liege.highest_held_title_tier >= tier_duchy
			is_female = yes
			fp3_custom_divinity_for_zoroastrianism_faiths = yes
		}
		localization_key = councillor_court_chaplain_zoroastrianism_religion_duchy_female
	}
	text = {
		trigger = {
			liege.highest_held_title_tier < tier_duchy
			fp3_custom_divinity_for_zoroastrianism_faiths = yes
		}
		localization_key = councillor_court_chaplain_zoroastrianism_religion_county
	}
	# African Roog
	text = {
		trigger = {
			faith.religion = faith:west_african_roog_pagan.religion
		}
		localization_key = councillor_court_chaplain_west_african_roog_religion_duchy
	}
	# African Bori
	text = {
		trigger = {
			faith.religion = faith:west_african_bori_pagan.religion
			is_female = no
		}
		localization_key = councillor_court_chaplain_west_african_bori_religion_duchy
	}
	text = {
		trigger = {
			faith.religion = faith:west_african_bori_pagan.religion
			is_female = yes
		}
		localization_key = councillor_court_chaplain_west_african_bori_religion_duchy_female
	}
	# African
	text = {
		trigger = {
			faith.religion = faith:west_african_pagan.religion
		}
		localization_key = councillor_court_chaplain_west_african_religion_duchy
	}
	
	# Tengrism
	text = {
		trigger = {
			liege.highest_held_title_tier >= tier_duchy
			faith.religion = faith:tengri_pagan.religion
		}
		localization_key = councillor_court_chaplain_tengrism_religion_kingdom
	}
	text = {
		trigger = {
			liege.highest_held_title_tier < tier_duchy
			faith.religion = faith:tengri_pagan.religion
		}
		localization_key = councillor_court_chaplain_tengrism_religion_duchy
	}

	#Taoism
	text = {
		trigger = {
			liege.highest_held_title_tier >= tier_kingdom
			faith.religion = religion:taoism_religion
		}
		localization_key = councillor_court_chaplain_taoism_religion_kingdom
	}
	text = {
		trigger = {
			liege.highest_held_title_tier >= tier_duchy
			faith.religion = religion:taoism_religion
		}
		localization_key = councillor_court_chaplain_taoism_religion_duchy
	}
	text = {
		trigger = {
			liege.highest_held_title_tier < tier_duchy
			faith.religion = religion:taoism_religion
			is_female = no
		}
		localization_key = councillor_court_chaplain_taoism_religion_county
	}
	text = {
		trigger = {
			liege.highest_held_title_tier < tier_duchy
			faith.religion = religion:taoism_religion
			is_female = yes
		}
		localization_key = councillor_court_chaplain_taoism_religion_county_female
	}

	#Finno-Ugric
	text = {
		trigger = {
			faith.religion = faith:finnish_pagan.religion
		}
		localization_key = councillor_court_chaplain_finno_ugric_religion_duchy
	}
	
	#Slavic
	text = {
		trigger = {
			liege.highest_held_title_tier >= tier_duchy
			faith.religion = faith:slavic_pagan.religion
			is_female = no
		}
		localization_key = councillor_court_chaplain_slavic_religion_kingdom
	}
	text = {
		trigger = {
			liege.highest_held_title_tier >= tier_duchy
			faith.religion = faith:slavic_pagan.religion
			is_female = yes
		}
		localization_key = councillor_court_chaplain_slavic_religion_kingdom_female
	}
	text = {
		trigger = {
			liege.highest_held_title_tier < tier_duchy
			faith.religion = faith:slavic_pagan.religion
			is_female = no
		}
		localization_key = councillor_court_chaplain_slavic_religion_duchy
	}
	text = {
		trigger = {
			liege.highest_held_title_tier < tier_duchy
			faith.religion = faith:slavic_pagan.religion
			is_female = yes
		}
		localization_key = councillor_court_chaplain_slavic_religion_duchy_female
	}

	#Baltic
	text = {
		trigger = {
			liege.highest_held_title_tier >= tier_duchy
			faith.religion = faith:baltic_pagan.religion
			is_female = no
		}
		localization_key = councillor_court_chaplain_baltic_religion_duchy
	}
	text = {
		trigger = {
			liege.highest_held_title_tier >= tier_duchy
			faith.religion = faith:baltic_pagan.religion
			is_female = yes
		}
		localization_key = councillor_court_chaplain_baltic_religion_duchy_female
	}
	text = {
		trigger = {
			liege.highest_held_title_tier < tier_duchy
			is_female = no
			OR = {
				faith.religion = faith:baltic_pagan.religion
				faith.religion = faith:slavic_pagan.religion
				faith.religion = faith:finnish_pagan.religion
				faith.religion = faith:zun_pagan.religion
			}
		}
		localization_key = councillor_court_chaplain_baltic_religion_county
	}
	text = {
		trigger = {
			liege.highest_held_title_tier < tier_duchy
			is_female = yes
			OR = {
				faith.religion = faith:baltic_pagan.religion
				faith.religion = faith:slavic_pagan.religion
				faith.religion = faith:finnish_pagan.religion
				faith.religion = faith:zun_pagan.religion
			}
		}
		localization_key = councillor_court_chaplain_baltic_religion_county_female
	}

	#Magyarism
	text = {
		trigger = {
			faith.religion = faith:magyar_pagan.religion
		}
		localization_key = councillor_court_chaplain_magyarism_religion_county
	}

	#Judaism
	text = {
		trigger = {
			liege.highest_held_title_tier >= tier_empire
			faith.religion = faith:rabbinism.religion
		}
		localization_key = councillor_court_chaplain_judaism_religion_empire
	}
	text = {
		trigger = {
			liege.highest_held_title_tier >= tier_kingdom
			faith.religion = faith:rabbinism.religion
		}
		localization_key = councillor_court_chaplain_judaism_religion_kingdom
	}
	text = {
		trigger = {
			liege.highest_held_title_tier >= tier_duchy
			faith.religion = faith:rabbinism.religion
		}
		localization_key = councillor_court_chaplain_judaism_religion_duchy
	}
	text = {
		trigger = {
			liege.highest_held_title_tier < tier_duchy
			faith.religion = faith:rabbinism.religion
		}
		localization_key = councillor_court_chaplain_judaism_religion_county
	}
	
	#Hellenic
	text = {
		trigger = {
			liege.highest_held_title_tier >= tier_kingdom
			faith.religion = faith:hellenic_pagan.religion
			is_female = no
		}
		localization_key = councillor_court_chaplain_hellenism_religion_kingdom
	}
	text = {
		trigger = {
			liege.highest_held_title_tier >= tier_kingdom
			faith.religion = faith:hellenic_pagan.religion
			is_female = yes
		}
		localization_key = councillor_court_chaplain_hellenism_religion_kingdom_female
	}
	text = {
		trigger = {
			liege.highest_held_title_tier >= tier_duchy
			faith.religion = faith:hellenic_pagan.religion
		}
		localization_key = councillor_court_chaplain_hellenism_religion_duchy
	}
	text = {
		trigger = {
			liege.highest_held_title_tier < tier_duchy
			faith.religion = faith:hellenic_pagan.religion
			is_female = no
		}
		localization_key = councillor_court_chaplain_hellenism_religion_county
	}
	text = {
		trigger = {
			liege.highest_held_title_tier < tier_duchy
			faith.religion = faith:hellenic_pagan.religion
			is_female = yes
		}
		localization_key = councillor_court_chaplain_hellenism_religion_county_female
	}

	#Norse
	text = {
		trigger = {
			liege.highest_held_title_tier >= tier_kingdom
			faith.religion = faith:norse_pagan.religion
		}
		localization_key = councillor_court_chaplain_germanic_religion_kingdom
	}
	text = {
		trigger = {
			liege.highest_held_title_tier >= tier_duchy
			faith.religion = faith:norse_pagan.religion
		}
		localization_key = councillor_court_chaplain_germanic_religion_duchy
	}
	text = {
		trigger = {
			liege.highest_held_title_tier < tier_duchy
			faith.religion = faith:norse_pagan.religion
			is_female = no
		}
		localization_key = councillor_court_chaplain_germanic_religion_county
	}
	text = {
		trigger = {
			liege.highest_held_title_tier < tier_duchy
			faith.religion = faith:norse_pagan.religion
			is_female = yes
		}
		localization_key = councillor_court_chaplain_germanic_religion_county_female
	}

	#Dualism
	text = {
		trigger = {
			liege.highest_held_title_tier < tier_duchy
			faith.religion = faith:manichean.religion
		}
		localization_key = councillor_court_chaplain_dualism_religion_county
	}

	#Bon
	text = {
		trigger = {
			liege.highest_held_title_tier >= tier_kingdom
			faith.religion = faith:bon.religion
		}
		localization_key = councillor_court_chaplain_bon_religion_kingdom
	}

	#Buddhism/Hinduism/Jainism
	text = {
		trigger = {
			liege.highest_held_title_tier >= tier_empire
			OR = {
				faith.religion = faith:theravada.religion
				faith.religion = faith:vaishnavism.religion
				faith.religion = faith:digambara.religion
			}
		}
		localization_key = councillor_court_chaplain_buddhism_religion_empire
	}
	text = {
		trigger = {
			liege.highest_held_title_tier >= tier_kingdom
			OR = {
				faith.religion = faith:theravada.religion
				faith.religion = faith:vaishnavism.religion
				faith.religion = faith:digambara.religion
			}
		}
		localization_key = councillor_court_chaplain_buddhism_religion_kingdom
	}
	text = {
		trigger = {
			liege.highest_held_title_tier >= tier_duchy
			OR = {
				faith.religion = faith:theravada.religion
				faith.religion = faith:vaishnavism.religion
				faith.religion = faith:digambara.religion
				faith.religion = faith:bon.religion
			}
		}
		localization_key = councillor_court_chaplain_buddhism_religion_duchy
	}
	text = {
		trigger = {
			liege.highest_held_title_tier < tier_duchy
			OR = {
				faith.religion = faith:theravada.religion
				faith.religion = faith:vaishnavism.religion
				faith.religion = faith:digambara.religion
				faith.religion = faith:bon.religion
			}
		}
		localization_key = councillor_court_chaplain_buddhism_religion_county
	}

	#Shia
	text = {
		trigger = { liege.highest_held_title_tier >= tier_empire faith = faith:ismaili }
		localization_key = councillor_court_chaplain_ismaili_empire
	}
	text = {
		trigger = { liege.highest_held_title_tier >= tier_kingdom faith = faith:ismaili }
		localization_key = councillor_court_chaplain_ismaili_kingdom
	}
	text = {
		trigger = { liege.highest_held_title_tier < tier_duchy faith = faith:ismaili }
		localization_key = councillor_court_chaplain_ismaili_county
	}

	#Islam
	text = {
		trigger = { liege.highest_held_title_tier >= tier_empire faith.religion = faith:ashari.religion }
		localization_key = councillor_court_chaplain_islam_empire
	}
	text = {
		trigger = { liege.highest_held_title_tier >= tier_kingdom faith.religion = faith:ashari.religion }
		localization_key = councillor_court_chaplain_islam_kingdom
	}
	text = {
		trigger = { liege.highest_held_title_tier >= tier_duchy faith.religion = faith:ashari.religion }
		localization_key = councillor_court_chaplain_islam_duchy
	}
	text = {
		trigger = { liege.highest_held_title_tier < tier_duchy faith.religion = faith:ashari.religion }
		localization_key = councillor_court_chaplain_islam_county
	}

	#Yazidi
	text = {
		trigger = { liege.highest_held_title_tier >= tier_empire faith.religion = faith:yazidi.religion }
		localization_key = councillor_court_chaplain_yazidi_empire
	}
	text = {
		trigger = { liege.highest_held_title_tier >= tier_kingdom faith.religion = faith:yazidi.religion }
		localization_key = councillor_court_chaplain_yazidi_kingdom
	}
	text = {
		trigger = { liege.highest_held_title_tier >= tier_duchy faith.religion = faith:yazidi.religion }
		localization_key = councillor_court_chaplain_yazidi_duchy
	}
	text = {
		trigger = { liege.highest_held_title_tier < tier_duchy faith.religion = faith:yazidi.religion }
		localization_key = councillor_court_chaplain_yazidi_county
	}

	#Orthodox
	text = {
		trigger = {
			liege.highest_held_title_tier >= tier_empire
			is_female = no
			OR = {
				faith = faith:orthodox
				faith.religion = faith:manichean.religion
			}
		}
		localization_key = councillor_court_chaplain_orthodox_empire
	}
	text = {
		trigger = {
			liege.highest_held_title_tier >= tier_empire
			is_female = yes
			OR = {
				faith = faith:orthodox
				faith.religion = faith:manichean.religion
			}
		}
		localization_key = councillor_court_chaplain_orthodox_empire_female
	}
	text = {
		trigger = {
			liege.highest_held_title_tier >= tier_kingdom
			is_female = no
			OR = {
				faith = faith:orthodox
				faith.religion = faith:manichean.religion
			}
		}
		localization_key = councillor_court_chaplain_orthodox_kingdom
	}
	text = {
		trigger = {
			liege.highest_held_title_tier >= tier_kingdom
			is_female = yes
			OR = {
				faith = faith:orthodox
				faith.religion = faith:manichean.religion
			}
		}
		localization_key = councillor_court_chaplain_orthodox_kingdom_female
	}
	text = {
		trigger = {
			liege.highest_held_title_tier >= tier_duchy
			OR = {
				faith = faith:orthodox
				faith.religion = faith:manichean.religion
			}
		}
		localization_key = councillor_court_chaplain_orthodox_duchy
	}
	text = {
		trigger = {
			liege.highest_held_title_tier < tier_duchy
			OR = {
				faith = faith:orthodox
				faith.religion = faith:manichean.religion
			}
		}
		localization_key = councillor_court_chaplain_orthodox_county
	}

	#Christian
	text = {
		trigger = { liege.highest_held_title_tier >= tier_empire is_female = no faith.religion = faith:catholic.religion }
		localization_key = councillor_court_chaplain_christian_empire
	}
	text = {
		trigger = { liege.highest_held_title_tier >= tier_empire is_female = yes faith.religion = faith:catholic.religion }
		localization_key = councillor_court_chaplain_christian_empire_female
	}
	text = {
		trigger = { liege.highest_held_title_tier >= tier_kingdom faith.religion = faith:catholic.religion }
		localization_key = councillor_court_chaplain_christian_kingdom
	}
	text = {
		trigger = { liege.highest_held_title_tier >= tier_duchy faith.religion = faith:catholic.religion }
		localization_key = councillor_court_chaplain_christian_duchy
	}
	text = {
		trigger = { liege.highest_held_title_tier < tier_duchy faith.religion = faith:catholic.religion }
		localization_key = councillor_court_chaplain_christian_county
	}

	#Basque Paganism
	text = {
		trigger = {
			religion = religion:basque_religion
		}
		localization_key = council_basque_priest
	}

	#Paganism
	text = {
		trigger = {
			faith = { has_doctrine = pagan_hostility_doctrine }
			liege.highest_held_title_tier >= tier_kingdom
			is_female = no
		}
		localization_key = councillor_court_chaplain_paganism_religion_kingdom
	}
	text = {
		trigger = {
			faith = { has_doctrine = pagan_hostility_doctrine }
			liege.highest_held_title_tier >= tier_kingdom
			is_female = yes
		}
		localization_key = councillor_court_chaplain_paganism_religion_kingdom_female
	}
	text = {
		trigger = {
			faith = { has_doctrine = pagan_hostility_doctrine }
			liege.highest_held_title_tier >= tier_duchy
		}
		localization_key = councillor_court_chaplain_paganism_religion_duchy
	}
	text = {
		trigger = {
			faith = { has_doctrine = pagan_hostility_doctrine }
			liege.highest_held_title_tier < tier_duchy
		}
		localization_key = councillor_court_chaplain_paganism_religion_county
	}

	#Fallback
	text = {
		trigger = { liege.highest_held_title_tier >= tier_empire is_female = no }
		localization_key = councillor_court_chaplain_theocrat_empire
	}
	text = {
		trigger = { liege.highest_held_title_tier >= tier_empire is_female = yes }
		localization_key = councillor_court_chaplain_theocrat_empire_female
	}
	text = {
		trigger = { liege.highest_held_title_tier >= tier_kingdom }
		localization_key = councillor_court_chaplain_theocrat_kingdom
	}
	text = {
		trigger = { liege.highest_held_title_tier >= tier_duchy }
		localization_key = councillor_court_chaplain_theocrat_duchy
	}
	text = {
		trigger = { liege.highest_held_title_tier < tier_duchy }
		localization_key = councillor_court_chaplain_theocrat_county
	}
}

# GetActualBishopTitle should be updated synchronously with this
GetActualBishopTitlePossessive = {
	type = character

	# Religion-By-Religion Titles for Bishops based on Liege's Tier.

	# Ryukyuan
	text = {
		trigger = {
			liege.highest_held_title_tier >= tier_kingdom
			faith = faith:ryukyuan
			is_female = yes
		}
		localization_key = councillor_court_chaplain_ryukyuan_female_kingdom_possessive
	}
	text = {
		trigger = {
			liege.highest_held_title_tier < tier_kingdom
			faith = faith:ryukyuan
			is_female = yes
		}
		localization_key = councillor_court_chaplain_ryukyuan_female_duchy_possessive
	}
	text = {
		trigger = {
			faith = faith:ryukyuan
			is_female = no
		}
		localization_key = councillor_court_chaplain_ryukyuan_male_possessive
	}

	# Shinto (except Ryukyuan)
	text = {
		trigger = {
			faith.religion = faith:shinto.religion
		}
		localization_key = councillor_court_chaplain_shinto_possessive
	}

	# Zunism
	text = {
		trigger = {
			liege.highest_held_title_tier >= tier_kingdom
			faith.religion = faith:zun_pagan.religion
			is_female = no
		}
		localization_key = councillor_court_chaplain_zunism_religion_kingdom_possessive
	}
	text = {
		trigger = {
			liege.highest_held_title_tier < tier_kingdom
			faith.religion = faith:zun_pagan.religion
			is_female = no
		}
		localization_key = councillor_court_chaplain_zunism_religion_duchy_possessive
	}

	# Zoroastrianism
	text = {
		trigger = {
			liege.highest_held_title_tier >= tier_kingdom
			faith.religion = faith:mazdayasna.religion
			is_female = no
		}
		localization_key = councillor_court_chaplain_zoroastrianism_religion_kingdom_possessive
	}
	text = {
		trigger = {
			liege.highest_held_title_tier >= tier_kingdom
			faith.religion = faith:mazdayasna.religion
			is_female = yes
		}
		localization_key = councillor_court_chaplain_zoroastrianism_religion_kingdom_female_possessive
	}
	text = {
		trigger = {
			liege.highest_held_title_tier >= tier_duchy
			faith.religion = faith:mazdayasna.religion
			is_female = no
		}
		localization_key = councillor_court_chaplain_zoroastrianism_religion_duchy_possessive
	}
	text = {
		trigger = {
			liege.highest_held_title_tier >= tier_duchy
			faith.religion = faith:mazdayasna.religion
			is_female = yes
		}
		localization_key = councillor_court_chaplain_zoroastrianism_religion_duchy_female_possessive
	}
	text = {
		trigger = {
			liege.highest_held_title_tier < tier_duchy
			faith.religion = faith:mazdayasna.religion
		}
		localization_key = councillor_court_chaplain_zoroastrianism_religion_county_possessive
	}
	# African Roog
	text = {
		trigger = {
			faith.religion = faith:west_african_roog_pagan.religion
		}
		localization_key = councillor_court_chaplain_west_african_roog_religion_duchy_possessive
	}
	# African Bori
	text = {
		trigger = {
			faith.religion = faith:west_african_bori_pagan.religion
			is_female = no
		}
		localization_key = councillor_court_chaplain_west_african_bori_religion_duchy_possessive
	}
	text = {
		trigger = {
			faith.religion = faith:west_african_bori_pagan.religion
			is_female = yes
		}
		localization_key = councillor_court_chaplain_west_african_bori_religion_duchy_female_possessive
	}
	# African
	text = {
		trigger = {
			faith.religion = faith:west_african_pagan.religion
		}
		localization_key = councillor_court_chaplain_west_african_religion_duchy_possessive
	}
	
	# Tengrism
	text = {
		trigger = {
			liege.highest_held_title_tier >= tier_duchy
			faith.religion = faith:tengri_pagan.religion
		}
		localization_key = councillor_court_chaplain_tengrism_religion_kingdom_possessive
	}
	text = {
		trigger = {
			liege.highest_held_title_tier < tier_duchy
			faith.religion = faith:tengri_pagan.religion
		}
		localization_key = councillor_court_chaplain_tengrism_religion_duchy_possessive
	}

	#Taoism
	text = {
		trigger = {
			liege.highest_held_title_tier >= tier_kingdom
			faith.religion = religion:taoism_religion
		}
		localization_key = councillor_court_chaplain_taoism_religion_kingdom_possessive
	}
	text = {
		trigger = {
			liege.highest_held_title_tier >= tier_duchy
			faith.religion = religion:taoism_religion
		}
		localization_key = councillor_court_chaplain_taoism_religion_duchy_possessive
	}
	text = {
		trigger = {
			liege.highest_held_title_tier < tier_duchy
			faith.religion = religion:taoism_religion
			is_female = no
		}
		localization_key = councillor_court_chaplain_taoism_religion_county_possessive
	}
	text = {
		trigger = {
			liege.highest_held_title_tier < tier_duchy
			faith.religion = religion:taoism_religion
			is_female = yes
		}
		localization_key = councillor_court_chaplain_taoism_religion_county_female_possessive
	}

	#Finno-Ugric
	text = {
		trigger = {
			faith.religion = faith:finnish_pagan.religion
		}
		localization_key = councillor_court_chaplain_finno_ugric_religion_duchy_possessive
	}
	
	#Slavic
	text = {
		trigger = {
			liege.highest_held_title_tier >= tier_duchy
			faith.religion = faith:slavic_pagan.religion
			is_female = no
		}
		localization_key = councillor_court_chaplain_slavic_religion_kingdom_possessive
	}
	text = {
		trigger = {
			liege.highest_held_title_tier >= tier_duchy
			faith.religion = faith:slavic_pagan.religion
			is_female = yes
		}
		localization_key = councillor_court_chaplain_slavic_religion_kingdom_female_possessive
	}
	text = {
		trigger = {
			liege.highest_held_title_tier < tier_duchy
			faith.religion = faith:slavic_pagan.religion
			is_female = no
		}
		localization_key = councillor_court_chaplain_slavic_religion_duchy_possessive
	}
	text = {
		trigger = {
			liege.highest_held_title_tier < tier_duchy
			faith.religion = faith:slavic_pagan.religion
			is_female = yes
		}
		localization_key = councillor_court_chaplain_slavic_religion_duchy_female_possessive
	}

	#Baltic
	text = {
		trigger = {
			liege.highest_held_title_tier >= tier_duchy
			faith.religion = faith:baltic_pagan.religion
			is_female = no
		}
		localization_key = councillor_court_chaplain_baltic_religion_duchy_possessive
	}
	text = {
		trigger = {
			liege.highest_held_title_tier >= tier_duchy
			faith.religion = faith:baltic_pagan.religion
			is_female = yes
		}
		localization_key = councillor_court_chaplain_baltic_religion_duchy_female_possessive
	}
	text = {
		trigger = {
			liege.highest_held_title_tier < tier_duchy
			is_female = no
			OR = {
				faith.religion = faith:baltic_pagan.religion
				faith.religion = faith:slavic_pagan.religion
				faith.religion = faith:finnish_pagan.religion
				faith.religion = faith:zun_pagan.religion
			}
		}
		localization_key = councillor_court_chaplain_baltic_religion_county_possessive
	}
	text = {
		trigger = {
			liege.highest_held_title_tier < tier_duchy
			is_female = yes
			OR = {
				faith.religion = faith:baltic_pagan.religion
				faith.religion = faith:slavic_pagan.religion
				faith.religion = faith:finnish_pagan.religion
				faith.religion = faith:zun_pagan.religion
			}
		}
		localization_key = councillor_court_chaplain_baltic_religion_county_female_possessive
	}

	#Magyarism
	text = {
		trigger = {
			faith.religion = faith:magyar_pagan.religion
		}
		localization_key = councillor_court_chaplain_magyarism_religion_county_possessive
	}

	#Judaism
	text = {
		trigger = {
			liege.highest_held_title_tier >= tier_empire
			faith.religion = faith:rabbinism.religion
		}
		localization_key = councillor_court_chaplain_judaism_religion_empire_possessive
	}
	text = {
		trigger = {
			liege.highest_held_title_tier >= tier_kingdom
			faith.religion = faith:rabbinism.religion
		}
		localization_key = councillor_court_chaplain_judaism_religion_kingdom_possessive
	}
	text = {
		trigger = {
			liege.highest_held_title_tier >= tier_duchy
			faith.religion = faith:rabbinism.religion
		}
		localization_key = councillor_court_chaplain_judaism_religion_duchy_possessive
	}
	text = {
		trigger = {
			liege.highest_held_title_tier < tier_duchy
			faith.religion = faith:rabbinism.religion
		}
		localization_key = councillor_court_chaplain_judaism_religion_county_possessive
	}
	
	#Hellenic
	text = {
		trigger = {
			liege.highest_held_title_tier >= tier_kingdom
			faith.religion = faith:hellenic_pagan.religion
			is_female = no
		}
		localization_key = councillor_court_chaplain_hellenism_religion_kingdom_possessive
	}
	text = {
		trigger = {
			liege.highest_held_title_tier >= tier_kingdom
			faith.religion = faith:hellenic_pagan.religion
			is_female = yes
		}
		localization_key = councillor_court_chaplain_hellenism_religion_kingdom_female_possessive
	}
	text = {
		trigger = {
			liege.highest_held_title_tier >= tier_duchy
			faith.religion = faith:hellenic_pagan.religion
		}
		localization_key = councillor_court_chaplain_hellenism_religion_duchy_possessive
	}
	text = {
		trigger = {
			liege.highest_held_title_tier < tier_duchy
			faith.religion = faith:hellenic_pagan.religion
			is_female = no
		}
		localization_key = councillor_court_chaplain_hellenism_religion_county_possessive
	}
	text = {
		trigger = {
			liege.highest_held_title_tier < tier_duchy
			faith.religion = faith:hellenic_pagan.religion
			is_female = yes
		}
		localization_key = councillor_court_chaplain_hellenism_religion_county_female_possessive
	}

	#Norse
	text = {
		trigger = {
			liege.highest_held_title_tier >= tier_kingdom
			faith.religion = faith:norse_pagan.religion
		}
		localization_key = councillor_court_chaplain_germanic_religion_kingdom_possessive
	}
	text = {
		trigger = {
			liege.highest_held_title_tier >= tier_duchy
			faith.religion = faith:norse_pagan.religion
		}
		localization_key = councillor_court_chaplain_germanic_religion_duchy_possessive
	}
	text = {
		trigger = {
			liege.highest_held_title_tier < tier_duchy
			faith.religion = faith:norse_pagan.religion
			is_female = no
		}
		localization_key = councillor_court_chaplain_germanic_religion_county_possessive
	}
	text = {
		trigger = {
			liege.highest_held_title_tier < tier_duchy
			faith.religion = faith:norse_pagan.religion
			is_female = yes
		}
		localization_key = councillor_court_chaplain_germanic_religion_county_female_possessive
	}

	#Dualism
	text = {
		trigger = {
			liege.highest_held_title_tier < tier_duchy
			faith.religion = faith:manichean.religion
		}
		localization_key = councillor_court_chaplain_dualism_religion_county_possessive
	}

	#Bon
	text = {
		trigger = {
			liege.highest_held_title_tier >= tier_kingdom
			faith.religion = faith:bon.religion
		}
		localization_key = councillor_court_chaplain_bon_religion_kingdom_possessive
	}

	#Buddhism/Hinduism/Jainism
	text = {
		trigger = {
			liege.highest_held_title_tier >= tier_empire
			OR = {
				faith.religion = faith:theravada.religion
				faith.religion = faith:vaishnavism.religion
				faith.religion = faith:digambara.religion
			}
		}
		localization_key = councillor_court_chaplain_buddhism_religion_empire_possessive
	}
	text = {
		trigger = {
			liege.highest_held_title_tier >= tier_kingdom
			OR = {
				faith.religion = faith:theravada.religion
				faith.religion = faith:vaishnavism.religion
				faith.religion = faith:digambara.religion
			}
		}
		localization_key = councillor_court_chaplain_buddhism_religion_kingdom_possessive
	}
	text = {
		trigger = {
			liege.highest_held_title_tier >= tier_duchy
			OR = {
				faith.religion = faith:theravada.religion
				faith.religion = faith:vaishnavism.religion
				faith.religion = faith:digambara.religion
				faith.religion = faith:bon.religion
			}
		}
		localization_key = councillor_court_chaplain_buddhism_religion_duchy_possessive
	}
	text = {
		trigger = {
			liege.highest_held_title_tier < tier_duchy
			OR = {
				faith.religion = faith:theravada.religion
				faith.religion = faith:vaishnavism.religion
				faith.religion = faith:digambara.religion
				faith.religion = faith:bon.religion
			}
		}
		localization_key = councillor_court_chaplain_buddhism_religion_county_possessive
	}

	#Shia
	text = {
		trigger = { liege.highest_held_title_tier >= tier_empire faith = faith:ismaili }
		localization_key = councillor_court_chaplain_ismaili_empire_possessive
	}
	text = {
		trigger = { liege.highest_held_title_tier >= tier_kingdom faith = faith:ismaili }
		localization_key = councillor_court_chaplain_ismaili_kingdom_possessive
	}
	text = {
		trigger = { liege.highest_held_title_tier < tier_duchy faith = faith:ismaili }
		localization_key = councillor_court_chaplain_ismaili_county_possessive
	}

	#Islam
	text = {
		trigger = { liege.highest_held_title_tier >= tier_empire faith.religion = faith:ashari.religion }
		localization_key = councillor_court_chaplain_islam_empire_possessive
	}
	text = {
		trigger = { liege.highest_held_title_tier >= tier_kingdom faith.religion = faith:ashari.religion }
		localization_key = councillor_court_chaplain_islam_kingdom_possessive
	}
	text = {
		trigger = { liege.highest_held_title_tier >= tier_duchy faith.religion = faith:ashari.religion }
		localization_key = councillor_court_chaplain_islam_duchy_possessive
	}
	text = {
		trigger = { liege.highest_held_title_tier < tier_duchy faith.religion = faith:ashari.religion }
		localization_key = councillor_court_chaplain_islam_county_possessive
	}

	#Yazidi
	text = {
		trigger = { liege.highest_held_title_tier >= tier_empire faith.religion = faith:yazidi.religion }
		localization_key = councillor_court_chaplain_yazidi_empire_possessive
	}
	text = {
		trigger = { liege.highest_held_title_tier >= tier_kingdom faith.religion = faith:yazidi.religion }
		localization_key = councillor_court_chaplain_yazidi_kingdom_possessive
	}
	text = {
		trigger = { liege.highest_held_title_tier >= tier_duchy faith.religion = faith:yazidi.religion }
		localization_key = councillor_court_chaplain_yazidi_duchy_possessive
	}
	text = {
		trigger = { liege.highest_held_title_tier < tier_duchy faith.religion = faith:yazidi.religion }
		localization_key = councillor_court_chaplain_yazidi_county_possessive
	}

	#Orthodox
	text = {
		trigger = {
			liege.highest_held_title_tier >= tier_empire
			is_female = no
			OR = {
				faith = faith:orthodox
				faith.religion = faith:manichean.religion
			}
		}
		localization_key = councillor_court_chaplain_orthodox_empire_possessive
	}
	text = {
		trigger = {
			liege.highest_held_title_tier >= tier_empire
			is_female = yes
			OR = {
				faith = faith:orthodox
				faith.religion = faith:manichean.religion
			}
		}
		localization_key = councillor_court_chaplain_orthodox_empire_female_possessive
	}
	text = {
		trigger = {
			liege.highest_held_title_tier >= tier_kingdom
			is_female = no
			OR = {
				faith = faith:orthodox
				faith.religion = faith:manichean.religion
			}
		}
		localization_key = councillor_court_chaplain_orthodox_kingdom_possessive
	}
	text = {
		trigger = {
			liege.highest_held_title_tier >= tier_kingdom
			is_female = yes
			OR = {
				faith = faith:orthodox
				faith.religion = faith:manichean.religion
			}
		}
		localization_key = councillor_court_chaplain_orthodox_kingdom_female_possessive
	}
	text = {
		trigger = {
			liege.highest_held_title_tier >= tier_duchy
			OR = {
				faith = faith:orthodox
				faith.religion = faith:manichean.religion
			}
		}
		localization_key = councillor_court_chaplain_orthodox_duchy_possessive
	}
	text = {
		trigger = {
			liege.highest_held_title_tier < tier_duchy
			OR = {
				faith = faith:orthodox
				faith.religion = faith:manichean.religion
			}
		}
		localization_key = councillor_court_chaplain_orthodox_county_possessive
	}

	#Christian
	text = {
		trigger = { liege.highest_held_title_tier >= tier_empire is_female = no faith.religion = faith:catholic.religion }
		localization_key = councillor_court_chaplain_christian_empire_possessive
	}
	text = {
		trigger = { liege.highest_held_title_tier >= tier_empire is_female = yes faith.religion = faith:catholic.religion }
		localization_key = councillor_court_chaplain_christian_empire_female_possessive
	}
	text = {
		trigger = { liege.highest_held_title_tier >= tier_kingdom faith.religion = faith:catholic.religion }
		localization_key = councillor_court_chaplain_christian_kingdom_possessive
	}
	text = {
		trigger = { liege.highest_held_title_tier >= tier_duchy faith.religion = faith:catholic.religion }
		localization_key = councillor_court_chaplain_christian_duchy_possessive
	}
	text = {
		trigger = { liege.highest_held_title_tier < tier_duchy faith.religion = faith:catholic.religion }
		localization_key = councillor_court_chaplain_christian_county_possessive
	}

	#Paganism
	text = {
		trigger = {
			faith = { has_doctrine = pagan_hostility_doctrine }
			liege.highest_held_title_tier >= tier_kingdom
			is_female = no
		}
		localization_key = councillor_court_chaplain_paganism_religion_kingdom_possessive
	}
	text = {
		trigger = {
			faith = { has_doctrine = pagan_hostility_doctrine }
			liege.highest_held_title_tier >= tier_kingdom
			is_female = yes
		}
		localization_key = councillor_court_chaplain_paganism_religion_kingdom_female_possessive
	}
	text = {
		trigger = {
			faith = { has_doctrine = pagan_hostility_doctrine }
			liege.highest_held_title_tier >= tier_duchy
		}
		localization_key = councillor_court_chaplain_paganism_religion_duchy_possessive
	}
	text = {
		trigger = {
			faith = { has_doctrine = pagan_hostility_doctrine }
			liege.highest_held_title_tier < tier_duchy
		}
		localization_key = councillor_court_chaplain_paganism_religion_county_possessive
	}

	#Fallback
	text = {
		trigger = { liege.highest_held_title_tier >= tier_empire is_female = no }
		localization_key = councillor_court_chaplain_theocrat_empire_possessive
	}
	text = {
		trigger = { liege.highest_held_title_tier >= tier_empire is_female = yes }
		localization_key = councillor_court_chaplain_theocrat_empire_female_possessive
	}
	text = {
		trigger = { liege.highest_held_title_tier >= tier_kingdom }
		localization_key = councillor_court_chaplain_theocrat_kingdom_possessive
	}
	text = {
		trigger = { liege.highest_held_title_tier >= tier_duchy }
		localization_key = councillor_court_chaplain_theocrat_duchy_possessive
	}
	text = {
		trigger = { liege.highest_held_title_tier < tier_duchy }
		localization_key = councillor_court_chaplain_theocrat_county_possessive
	}
}

GetBirthOmen = {
	type = character
	random_valid = yes

	text = {
		localization_key = birth_omen_caul
	}
	text = {
		localization_key = birth_omen_finger
	}
	text = {
		localization_key = birth_omen_birthmark	
	}
}

GetTaltosTerm = {
	type = character

	text = {
		trigger = {	religion = religion:magyar_religion }
		localization_key = chosen_one_taltos
	}
	text = {
		trigger = {
			always = no
		}
		localization_key = chosen_one_fallback
		fallback = yes
	}
}

GetReligiousRite = {
	type = character

	text = {
		localization_key = rite_mass
		trigger = { faith = { religion = religion:christianity_religion } }
	}
	text = {
		localization_key = rite_prayer
		trigger = {
			faith = {
				OR = {
					religion = religion:islam_religion
					religion = religion:judaism_religion
					religion = { is_in_family = rf_eastern }
				}
			}
		}
	}



	text = {
		trigger = {
			always = no
		}
		fallback = yes
		localization_key = rite_worship
	}
}

# Doctrine Parameters
GetRiteEcumenismFullOrEmpty = {
	type = character

	text = {
		trigger = {
			faith = { has_doctrine = special_doctrine_ecumenical_christian }
		}
		localization_key = GetRiteEcumenismFullOrEmpty_full
	}
	text = {
		trigger = {
			NOT = {
				faith = { has_doctrine = special_doctrine_ecumenical_christian }
			}
		}
		localization_key = GetRiteEcumenismFullOrEmpty_empty
	}
}

# Does the character's faith have Armed Pilgrimages or Struggle & Submission?
ghw_from_which_tenet = {
	type = character

	text = {
		trigger = {
			faith = { has_doctrine = tenet_armed_pilgrimages }
		}
		localization_key = ghw_from_which_tenet_armed_pilgrimages
	}

	text = {
		trigger = {
			faith = { has_doctrine = tenet_struggle_submission }
		}
		localization_key = ghw_from_which_tenet_struggle_submission
	}

	text = {
		trigger = {
			faith = { has_doctrine = tenet_warmonger }
		}
		localization_key = ghw_from_which_tenet_warmonger
	}
}

# Which institutions would be exempt from tax in this faith?
GetFaithTaxExemptInstitution = {
	type = character

	# Theocratic clergy faiths exempt the Church.
	text = {
		trigger = {
			faith = { has_doctrine_parameter = theocracy_temple_lease }
		}
		localization_key = faithtaxexemption_the_church
	}

	# Lay clergy faiths exempt charities.
	text = {
		trigger = {
			faith = { has_doctrine_parameter = lay_clergy }
		}
		fallback = yes
		localization_key = faithtaxexemption_charities
	}
}
